<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/report/report/View_ReportAOPInventory.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/report/report/View_ReportAOPInventory.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '委外订单报表',
                name: 'report/View_ReportAOPInventory',
                url: "/View_ReportAOPInventory/",
                sortName: "CMONum"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"OrgCode":"","CMONum":"","ParentNum":"","Finished":""});
            const searchFormOptions = ref([[{"dataKey":"Org","data":[],"title":"组织","field":"OrgCode","type":"select"},{"dataKey":"enable","data":[],"title":"是否结案","field":"Finished","type":"radio"}],[{"title":"委外订单号","field":"CMONum","type":"like"},{"title":"产品代码","field":"ParentNum","type":"like"}]]);
            const columns = ref([{field:'CMONum',title:'委外订单号',type:'string',width:160,require:true,align:'center'},
                       {field:'ParentNum',title:'产品代码',type:'string',width:220,align:'center'},
                       {field:'ParentName',title:'产品名称',type:'string',width:120,align:'center'},
                       {field:'FPrdQty',title:'订单数量',type:'decimal',width:110,align:'center'},
                       {field:'FPrdStockQty',title:'入库数量',type:'decimal',width:110,align:'center'},
                       {field:'FSubNum',title:'子项物料代码',type:'string',width:220,align:'center'},
                       {field:'FSubName',title:'子项物料名称',type:'string',width:120,align:'center'},
                       {field:'FMustQty',title:'投料数量',type:'decimal',width:110,require:true,align:'center'},
                       {field:'FPrdSumQty',title:'委外发料数',type:'decimal',width:110,require:true,align:'center'},
                       {field:'FPrdSumCQty',title:'委外超发料数',type:'decimal',width:110,require:true,align:'center'},
                       {field:'FPrdSumEndQty',title:'委外入库消耗',type:'decimal',width:110,align:'center'},
                       {field:'FPrdAllSumQty',title:'委外结存',type:'decimal',width:110,align:'center'},
                       {field:'ID',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'center'},
                       {field:'Finished',title:'是否结案',type:'int',bind:{ key:'enable',data:[]},width:80,hidden:true,require:true,align:'center'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
